{% extends "base_irc.html" %}
{% block title %}DjangoBot: {{ date|date:"Y-n-j" }} | {{ channel }} logs{% endblock %}
{% block heading %}DjangoBot: {{ channel }}{% endblock %}
{% block content %}

    <h2>{{ date|date:"Y-n-j" }}</h2>

	{% load cache %}
	{% load colorme %}
	
    <table>
        {% if messages %}
        {% cache 43200 messages channel date %}
        {% for message in messages %}
        <tr valign="top">
            <td><a href="#">{{ message.logged|date:"H:i" }}</a></td>
            {% if message.is_action %}
            <td colspan="2">{{ message.nickname }} {{ message.text|urlizetrunc:"50" }}</td>
            {% else %}
            <td align="right" style="color: {{ message.nickname|colorize }};"><strong>{{ message.nickname }}</strong></td>
            <td><div style="overflow:auto;">{{ message.text|urlizetrunc:"50" }}</div></td>
            {% endif %}
        </tr>
        {% endfor %}
        {% endcache %}
        {% endif %}
    </table>
{% endblock %}

{% block sidebar %}
{% load cal %}
{% display_calendar for date in channel %}
{% endblock %}